package generator;

import javax.swing.JCheckBox;

import a.SwingShell;
import checkbox.JCheckBoxPanel;
import enum_.Enumerate;

public class Generator {

	public static void Generuj(Object o,String labname)
	{
		String gen="";
		if(o instanceof JCheckBoxPanel)
		{
			JCheckBoxPanel s=(JCheckBoxPanel)o;
			StringBuilder aaa=new StringBuilder();
			if(s.getElementName()==Enumerate.DESCRIPTION.toString())
			{
				aaa.append("-");
				aaa.append(Enumerate.DESCRIPTION);
				aaa.append(checkbox(s.isSelected()));
			}
			SwingShell.arraycomandpanel.get(labname).setcommand(aaa.toString());
		}
	}
	static String checkbox(boolean check)
	{
		return check?"=true":"=false";
	}
}
